//
//  HLDetailViewController.swift
//  HLXiMaLaYa
//
//  Created by hulinhu on 2018/1/30.
//  Copyright © 2018年 hulinhu. All rights reserved.
//

import UIKit

class HLDetailViewController: HLBaseViewController {

    override func viewDidLoad() {
        super.viewDidLoad()
        initNavBarMudule()
        initUI()
    }
    
    override func touchesBegan(_ touches: Set<UITouch>, with event: UIEvent?) {
        self.dismiss(animated: true, completion: nil)
    }
}

extension HLDetailViewController {
    
    // MARK:- 初始化视图
    private func initUI() {
        self.title = "详情"
    }
}
extension HLDetailViewController:HLNavUniversalable {
    
    // MARK:- 导航组件
    private func initNavBarMudule() {
        // 消息 搜索
        let models = [HLNavBarItemMetric.back,
                      HLNavBarItemMetric.search]
        self.universals(modelArr: models) { [weak self] (model) in
            guard let `self` = self else { return }
            NSLog(model.description)
            let type = model.type
            switch type {
            case .back:
                self.navigationController?.popViewController(animated: true)
                break
            default: break
            }
        }
    }
}
